package com.dungeon.game;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;

import com.dungeon.game.Enemies.Mob;

import android.graphics.Color;

public class Constants {

	static double TIME_SCALAR = 0.8; // slow the game down a bit

	public enum Game_mode {
MODE_NORMAL,
MODE_ACTION,
MODE_FRIENDLY_TARGET,
MODE_ENEMY_TARGET,
MODE_DRAGGING,
	}

	public enum Shopping_code{
SHOP_MAINHAND,
SHOP_OFFHAND,
SHOP_SHOOTER,
SHOP_CHEST,
SHOP_POTION,
SHOP_TRINKET
	}

	public enum Class_code {
C_WARRIOR,
C_MAGE,
C_PRIEST,
C_ROGUE,
	};

	static HashMap<Class_code,String> class_code_to_name;

	static {
        class_code_to_name = new HashMap<Class_code,String>();
        class_code_to_name.put(Class_code.C_WARRIOR,"Warrior");
        class_code_to_name.put(Class_code.C_MAGE,"Mage");
        class_code_to_name.put(Class_code.C_PRIEST,"Priest");
        class_code_to_name.put(Class_code.C_ROGUE,"Rogue");
	}

	static HashMap<String,String> image_to_default_name;
	static HashMap<String,String> image_to_good_stat;

	static {
		image_to_default_name = new HashMap<String,String>();
		image_to_default_name.put("priest_1", "Hildegrin");
		image_to_default_name.put("priest_2", "Gyoll");
		image_to_default_name.put("priest_3", "Inire");
		image_to_default_name.put("priest_4", "Drotte");
		image_to_default_name.put("priest_5", "Aybert");
		image_to_default_name.put("priest_6", "Zama");
		image_to_default_name.put("priest_7", "Alcmund");
		image_to_default_name.put("priest_8", "Chuniald");
		image_to_default_name.put("priest_9", "Bregywn");
		image_to_default_name.put("priest_10", "Merryn");
		image_to_default_name.put("priest_11", "Yesod");
		image_to_default_name.put("priest_12", "Odilo");
		image_to_default_name.put("priest_13", "Mineas");
		image_to_default_name.put("rogue_1", "Becan");
		image_to_default_name.put("rogue_2", "Ascia");
		image_to_default_name.put("rogue_3", "Briah");
		image_to_default_name.put("rogue_4", "Zak");
		image_to_default_name.put("rogue_5", "Jader");
		image_to_default_name.put("rogue_6", "Melito");
		image_to_default_name.put("rogue_7", "Samru");
		image_to_default_name.put("rogue_8", "Racho");
		image_to_default_name.put("rogue_9", "Sidero");
		image_to_default_name.put("rogue_10", "Triskele");
		image_to_default_name.put("rogue_11", "Talos");
		image_to_default_name.put("rogue_12", "Beuzec");
		image_to_default_name.put("rogue_13", "Idas");
		image_to_default_name.put("warrior_1", "Thrax");
		image_to_default_name.put("warrior_2", "Ymar");
		image_to_default_name.put("warrior_3", "Matachin");
		image_to_default_name.put("warrior_4", "Gurloes");
		image_to_default_name.put("warrior_5", "Abaia");
		image_to_default_name.put("warrior_6", "Meschiane");
		image_to_default_name.put("warrior_7", "Apheta");
		image_to_default_name.put("warrior_8", "Hallvard");
		image_to_default_name.put("warrior_9", "Dorcas");
		image_to_default_name.put("warrior_10", "Vici");
		image_to_default_name.put("warrior_11", "Anskar");
		image_to_default_name.put("warrior_12", "Thais");
		image_to_default_name.put("warrior_13", "Decuman");
		image_to_default_name.put("wizard_1", "Nessus");
		image_to_default_name.put("wizard_2", "Ceryx");
		image_to_default_name.put("wizard_3", "Saltus");
		image_to_default_name.put("wizard_4", "Palaemon");
		image_to_default_name.put("wizard_5", "Ultan");
		image_to_default_name.put("wizard_6", "Diuturna");
		image_to_default_name.put("wizard_7", "Katharine");
		image_to_default_name.put("wizard_8", "Maxellindis");
		image_to_default_name.put("wizard_9", "Herena");
		image_to_default_name.put("wizard_10", "Baldanders");
		image_to_default_name.put("wizard_11", "Malrubius");
		image_to_default_name.put("wizard_12", "Nicarete");
		image_to_default_name.put("wizard_13", "Danaides");

		image_to_good_stat = new HashMap<String,String>();
		image_to_good_stat.put("priest_1", "training");
		image_to_good_stat.put("priest_2", "wisdom");
		image_to_good_stat.put("priest_3", "valor");
		image_to_good_stat.put("priest_4", "reflexes");
		image_to_good_stat.put("priest_5", "stamina");
		image_to_good_stat.put("priest_6", "constitution");
		image_to_good_stat.put("priest_7", "training");
		image_to_good_stat.put("priest_8", "valor");
		image_to_good_stat.put("priest_9", "constitution");
		image_to_good_stat.put("priest_10", "wisdom");
		image_to_good_stat.put("priest_11", "wisdom");
		image_to_good_stat.put("priest_12", "valor");
		image_to_good_stat.put("priest_13", "stamina");
		image_to_good_stat.put("rogue_1", "daring");
		image_to_good_stat.put("rogue_2", "cunning");
		image_to_good_stat.put("rogue_3", "training");
		image_to_good_stat.put("rogue_4", "reflexes");
		image_to_good_stat.put("rogue_5", "training");
		image_to_good_stat.put("rogue_6", "constitution");
		image_to_good_stat.put("rogue_7", "stamina");
		image_to_good_stat.put("rogue_8", "daring");
		image_to_good_stat.put("rogue_9", "stamina");
		image_to_good_stat.put("rogue_10", "cunning");
		image_to_good_stat.put("rogue_11", "daring");
		image_to_good_stat.put("rogue_12", "cunning");
		image_to_good_stat.put("rogue_13", "reflexes");
		image_to_good_stat.put("warrior_1", "training");
		image_to_good_stat.put("warrior_2", "training");
		image_to_good_stat.put("warrior_3", "strength");
		image_to_good_stat.put("warrior_4", "constitution");
		image_to_good_stat.put("warrior_5", "skill");
		image_to_good_stat.put("warrior_6", "stamina");
		image_to_good_stat.put("warrior_7", "skill");
		image_to_good_stat.put("warrior_8", "constitution");
		image_to_good_stat.put("warrior_9", "reflexes");
		image_to_good_stat.put("warrior_10", "strength");
		image_to_good_stat.put("warrior_11", "stamina");
		image_to_good_stat.put("warrior_12", "skill");
		image_to_good_stat.put("warrior_13", "reflexes");
		image_to_good_stat.put("wizard_1", "subtlety");
		image_to_good_stat.put("wizard_2", "stamina");
		image_to_good_stat.put("wizard_3", "power");
		image_to_good_stat.put("wizard_4", "training");
		image_to_good_stat.put("wizard_5", "constitution");
		image_to_good_stat.put("wizard_6", "reflexes");
		image_to_good_stat.put("wizard_7", "subtlety");
		image_to_good_stat.put("wizard_8", "power");
		image_to_good_stat.put("wizard_9", "stamina");
		image_to_good_stat.put("wizard_10", "constitution");
		image_to_good_stat.put("wizard_11", "stamina");
		image_to_good_stat.put("wizard_12", "subtlety");
		image_to_good_stat.put("wizard_13", "training");

	}

	public enum Stance_code {
ST_BLOCK,
ST_DEFLECT,
ST_RETRENCH,
ST_COUNTER_PARALYSIS,
ST_TAKE_COVER,
ST_ALL_OUT_DEFENSE,
ST_RIPOSTE,
ST_COUNTER,
ST_FLY,
ST_STEALTH,
ST_BERSERK,
ST_INVULNERABLE,
ST_COUNTER_FEAR,
ST_COUNTER_SILENCE,
ST_COUNTER_SLEEP,
ST_COUNTER_BOLTS,
ST_COUNTER_DEATHBLOW,
ST_COUNTER_MANY,
ST_EPIC_BLOCK,
ST_LEAP_ASIDE,
ST_COUNTER_DRAINING,
ST_COUNTER_DARKNESS,
ST_CATCH,
ST_CHALICE,
	};

	public enum Status_effect_code {
EF_DODGE,
EF_RESIST_FIRE,
EF_PARALYSIS,
EF_POISON,
EF_RESIST_POISON,
EF_TAUNT,
EF_RIGHTEOUSNESS,
EF_FRONTROWBUFF,
EF_REVEAL_DANGER,
EF_INSULT,
EF_FIND_WEAKNESS,
EF_FORCEBRAND,
EF_EV,
EF_SHIELD,
EF_SLEEP,
EF_STUN,
EF_GRAPPLE,
EF_FEAR,
EF_MEDITATION,
EF_CURSE,
EF_RESIST_COLD,
EF_IMMUNE_FIRE,
EF_ACCURATE,
EF_SPEED,
EF_INVULNERABLE,
EF_BATTLECRY,
EF_REFLEXES,
EF_RAPIDITY,
EF_RECKLESS,
EF_BLESSING,
EF_LIFE_LEECH,
EF_PETRIFY,
EF_TAUNT3,
	};

	public enum Position_code {
POS_C_FRONT_1(true,false,true,true,false),
POS_C_FRONT_2(true,false,true,false,false),
POS_C_FRONT_3(true,false,true,false,true),
POS_C_BACK_1(true,false,false,true,false),
POS_C_BACK_2(true,false,false,false,false),
POS_C_BACK_3(true,false,false,false,true),
POS_M_FRONT_1(false,true,true,true,false),
POS_M_FRONT_2(false,true,true,false,false),
POS_M_FRONT_3(false,true,true,false,true),
POS_M_BACK_1(false,true,false,true,false),
POS_M_BACK_2(false,true,false,false,false),
POS_M_BACK_3(false,true,false,false,true),
POS_DOWN(false,false,false,false,false),
POS_BACK_LEFT(false,false,false,false,false),
POS_BACK_RIGHT(false,false,false,false,false);

	private final boolean character_area, enemy_area, front, left , right;
	private Position_code(final boolean character_area,final boolean enemy_area,final boolean front,final boolean left,final boolean right) { this.character_area = character_area; this.enemy_area = enemy_area; this.front = front; this.left = left; this.right = right;}

	public boolean is_front_row() { return this.front; }
	public boolean opposite(Position_code p) { return (this.left && p.right) || (this.right && p.left); } // careful
	public boolean adjacent(Position_code p) {
		if (!((this.character_area && p.character_area) || (this.enemy_area && p.enemy_area))) return false;
		if (this.front!=p.front) return false;
		if ((this.left && p.right) || (p.left && this.right)) return false;
		return true;
	}
	public boolean close(Position_code p) {
		if (!((this.character_area && p.character_area) || (this.enemy_area && p.enemy_area))) return false;
		if (this.front!=p.front){
			return this.left==p.left && this.right==p.right;
		}
		if ((this.left && p.right) || (p.left && this.right)) return false;
		return true;
	}
};

	public enum Character_action_code {
CA_POT_SMALLHEAL,
CA_POT_MEDHEAL,
CA_POT_BIGHEAL,
CA_POT_BARPRIEST,
CA_POT_BARMAGE,
CA_POT_BARROGUE,
CA_POT_PERCENTHEAL,
CA_POT_ANTIDOTE,
CA_POT_FIRERESIST,
CA_POT_COLDRESIST,
CA_POT_INVULNERABILITY,
CA_POT_COURAGE,
CA_POT_BERSERK,
CA_POT_BAR,
CA_POT_BOOM,

CA_FORCE_CAGE, // not used

CA_DEFLECT,
CA_SMITE,
CA_RETRENCH,
CA_CLEAVE,
CA_BLOCK,
CA_LEADER,
CA_BASH,
CA_SWIPE,
CA_RUTHLESS,
CA_POISON_RESISTANCE,
CA_FIRE_RESISTANCE,
CA_AGGRESSIVE,
CA_THROW,
CA_SHOOT,
CA_TAUNT,
CA_DRAGON_SLAYER,
CA_DEATHBLOW,
CA_ALL_OUT_DEFENSE,
CA_BERSERK,
CA_STEELY_GAZE,
CA_RESIST_FEAR,
CA_KNOCKBACK,
CA_EPIC_BLOCK,
CA_VETERAN,
CA_PROTECT_THE_FALLEN,
CA_STUNNING_BLOW,
CA_RAGE,

CA_RESIST_FIRE,
CA_SACRIFICE,
CA_HEALING,
CA_CURE_POISON,
CA_SELF_HEAL,
CA_SMALL_HEAL,
CA_BIG_HEAL,
CA_MASS_HEAL,
CA_SLING,
CA_ROSARY,
CA_AGGRO,
CA_ARMOR,
CA_HEALER,
CA_RIGHTEOUSNESS,
CA_FRONT_ROW_BUFF,
CA_CLEANSING_FLAME,
CA_REVEAL_DANGER,
CA_REVITALISE,
CA_CURE_FEAR,
CA_UNDEAD_SLAYER,
CA_TURN_UNDEAD,
CA_MEDITATION,
CA_CURE_MORTAL_WOUNDS,
CA_CURSE,

CA_LUCKY_ESCAPE,
CA_DODGE,
CA_SNIPE,
CA_TAKE_COVER,
CA_LUCKY_SHOT,
CA_FIND_WEAKNESS,
CA_FIND_TRAPS,
CA_INSULT_YOUR_MOTHER,
CA_ASSASSIN,
CA_ARCHER,
CA_RIPOSTE,
CA_PENETRATION,
CA_MORE_GOLD,
CA_MORE_GEMS,
CA_PICK_LOCKS,
CA_INCONSPICUOUS,
CA_STEALTH,
CA_AMBUSH,
CA_ACCURATE_SHOT,
CA_WEAKEN,
CA_LEAP_ASIDE,
CA_MAGEBANE,
CA_VENDETTA,
CA_CONFUSING_SPIEL,
CA_FREE_ACTION,
CA_DISTRACTION,
CA_GRAVE_ROBBER,
CA_QUICK_EXIT,
CA_QUICK_THINKING,

CA_POISON_CLOUD,
CA_COUNTERSPELL_PARALYSIS,
CA_LIGHTNING_BOLT,
CA_FLY,
CA_POISON_CLOUD_2,
CA_WAND_LORE,
CA_WAND_LORE_2,
CA_MISSILE,
CA_BUFF_EV,
CA_FORCE_BRAND,
CA_INVULNERABILITY,
CA_BLOOD_MAGIC,
CA_DEFLECT_MISSILE,
CA_SPARK,
CA_FIREBOLT,
CA_SHIELD,
CA_ESCAPE,
CA_KNIT_FLESH,
CA_CONCENTRATION,
CA_STICKY_FLAMES,
CA_SHOCKING_GRASP,
CA_CONFUSION,
CA_DECONSTRUCT,
CA_COUNTER_FEAR,
CA_COUNTER_SLEEP,
CA_COUNTER_SILENCE,
CA_REFLECTION,
CA_EXTINGUISH,
CA_SLOW_TIME,
CA_SHOCKWAVE,
CA_DISPELL,
CA_CLOAK_OF_SHADOWS,

CA_ZEAL,
CA_WRATHFUL,
CA_POLEARM_STRIKE,
CA_FLURRY,
CA_COUNTER_DRAINING,
CA_LIGHT,
CA_ARROW_CUTTING,
CA_ICE_STORM,
CA_POISON_BOLT,
CA_FROST_BOLT,
CA_RAY_OF_LIGHT,
CA_WARRIOR_SNIPE,
CA_JUST_A_SCRATCH,
CA_SALVATION,
CA_SAVING_THROW,
CA_FIRE_IMMUNITY,
CA_HOLY_LIGHT,
CA_LOB,
CA_ETERNAL_FLAME,
CA_DEADLY_BLADE,
CA_COLD_RESISTANCE,
CA_WATCHFUL,
CA_ZEN_ARCHER,
CA_RESIST_DRAINING,
CA_INSOLENT,
CA_HUNTER,
CA_TIRELESS,
CA_PRECOCIOUS,
CA_TEACHER,
CA_PACKRAT,
CA_APOTHECARY,
CA_FAST_CAST,
CA_EVASIVE,
CA_RECUPERATE,
CA_TOUGH,
CA_FAST_LEARNER,
CA_BRIBE,
CA_CHAIN_LIGHTNING,
CA_FIREBALL,
CA_COUP_DE_GRACE,
CA_SANCTUARY,
CA_BLESSING,
CA_GUIDANCE,
CA_DISPEL_SUMMONS,
CA_DISPEL_UNDEAD,
CA_TELEPORT_AWAY,
CA_BEFRIEND_ANIMAL,
CA_ANIMAL_KINSHIP,
CA_FIRST_AID,
CA_TRACTOR_BEAM, // not used
CA_BATTLECRY,
CA_ZAP, // not used
CA_ON_YOUR_GUARD,
CA_HAIL_OF_ARROWS,
CA_BE_WATCHFUL,
CA_RECKLESS,
CA_SHORTEN_THE_TALE,
CA_REBUKE,
CA_DEATH_SPELL,
CA_EXTERMINATE,
CA_SONIC_BLAST, // not used

CA_FEAR, // Subtlety 4
CA_DETECT_MAGIC, // Subtlety 5
CA_MASS_CONFUSION, // Subtlety 5
CA_SUMMON_FRIEND, // Subtlety 6
CA_RIDDLE, // Subtlety 6 or Cunning 6, confuse a dragon
CA_DEATH_TOUCH, // like death spell, useful for front row mage
CA_LIFE_LEECH, // Life leech on melee hit buff (front row mage again)
CA_FAST_CAST_FRONT_ROW, // Mage again, perhaps priest too
CA_STUN_RESISTANCE, // passive (Con 4, level 4)
CA_LAY_ON_HANDS, // Val 6
CA_DISBELIEVE,
CA_KNOCK,
CA_BASH_DOOR,
CA_BEACON,
CA_CATCH_BOULDER,

CA_FAST, /* +1 spe +1 rap */
CA_INOFFENSIVE, /* -1 aggro */
CA_BRUTAL, /* +1 dam */
CA_DEFT, /* +1 acc +1 aim */
CA_AGILE, /* +1 ev */
CA_KEEN, /* +10% XP */
CA_ROBUST, /* extra HP */

CA_CAPTAIN, /* remainder of party gets 10% extra XP */
CA_KNIGHT, /* +1 arm +1 acc */
CA_BARBARIAN, /* +1 dam +1 spe */
CA_RANGER, /* +1 aim +1 ev - rogue also */
CA_BURGLAR, /* +1 cunning for Hide in Shadows success chance */
CA_THIEF, /* +1 cunning for Looter, Lapidary, and Pick Locks */
CA_SWASHBUCKLER, /* +1 spe +1 dam */
CA_MARKSMAN, /* +1 acc +1 pen - mage also */
CA_WARLOCK, /* +1 power for bolt spells */
CA_THAUMATURGE, /* +1 power for mass damage spells */
CA_ENCHANTER, /* +1 subtlety for fear and confusion spells */
CA_SHAMAN, /* 20% fast cast - priest also */
CA_PALADIN, /* +1 agg +1 dam - warrior also */
CA_TEMPLAR, /* +1 acc +1 arm */
CA_MEDIC, /* +1 wisdom for healing spells */
CA_PADRE, /* party immune to fear */

CA_SPOTTER, /* Cun 4, debuff halving EV for not very long */
CA_MOCKERY, /* Dar 5, play shortly after enemies have been much damaged, to get all characters ?1 bar? */
CA_UNDAUNTED, /* Val 3 or Con 5, play just after party takes heavy damage, gain much bar */
CA_SLOW,

CA_HAGGLER,
CA_INSPIRING,
CA_CAROUSE,
CA_ADVERSITY,

CA_DELAYED_BLAST,
CA_RESIST_LIGHTNING,
CA_PROTECT_FROM_COLD,
CA_CHALICE,
CA_SELF_SACRIFICE,
CA_SUPER_SMITE,
CA_THEURGIC_WAVE,
CA_SNEAKY,
CA_LETHAL,
CA_LIFT_SKIRTS,
CA_UNCEASING_FIRE,
CA_POT_BALM,
CA_POT_PHILTRE,
CA_PHYSICAL_RESISTANCE,
	};

	public enum Equipment_type_code {
E_CHAINMAIL("chainmail",4,1.0),
E_BANDED_MAIL("banded_mail",5,1.0),
E_TUNIC("tunic",null,null),
E_CLOAK("cloak",null,null),
E_WHITE_ROBE("colored_robe_white_a_96_01",null,null),
E_LEATHER_CUIRASS("leather_cuirass",null,null),
E_PLATE_MAIL("plate_mail",null,null),
E_DWARVEN_CHAINMAIL("dwarven_chainmail",6,1.0),
E_ARCHERS_DOUBLET("archers_doublet",5,1.0),
E_RED_ROBE("red_robe",7,1.0),
E_BLUE_ROBE("colored_robe_blue_a_96_01",7,1.0),
E_ELVEN_CHAIN("elven_chain",7,1.0),
E_ELVEN_CLOAK("elven_cloak",5,1.0),
E_MAGIC_CLOAK("magic_cloak",6,1.0),
E_HERO_PLATE("hero_plate",null,null),
E_GUILDMASTER_ROBE("colored_robe_multi_colored_a_96_01",null,null),

E_LONGSWORD("longsword",4,1.0),
E_STAFF("staff",null,null),
E_MACE("mace",null,null),
E_CLUB("club",null,null),
E_DAGGER("normal_knife_a_96_01",null,null),
E_SPEAR("spear",null,null),
E_ANTIQUE_SWORD("antique_sword",null,null),
E_RAPIER("rapier",4,1.0),
E_RELIQUARY("relic",6,1.0),
E_GNARLED_STAFF("gnarled_staff",6,1.0),
E_WARLOCK_SWORD("warlock_sword",6,0.5),
E_ELVEN_KNIFE("main_gauche",5,1.0),
E_ASSASSINS_BLADE("assassins_dagger_c_96_01",6,1.0),
E_FLAIL("flail",4,1.0),
E_GREATSWORD("greatsword",5,1.0),
E_AXE("axe",4,1.0),
E_CHAMPIONS_SWORD("champions_sword",null,null),
E_MACE_OF_CHASTISEMENT("big_mace2",5,1.0),
E_DRAGONS_BANE("champions_sword",null,null),
E_MACE_OF_DISRUPTION("big_mace3",6,1.0),
E_MAUL("maul",5,1.0),
E_GREAT_AXE("great_axe",7,1.0),
E_GUISARME("guisarme",5,0.5),
E_HALBERD("halberd",7,0.5),
E_GREAT_HAMMER("great_hammer",7,0.5),
E_CUTLASS("cutlass",7,1.0),
E_JEWELED_STAFF("jeweled_staff",8,1.0),
E_RED_STAFF("red_staff",7,1.0),
E_WAR_STAFF("war_staff",5,0.5),
E_BOOK_OF_EXORCISM("book_of_exorcism",7,1.0),
E_BOOK_OF_PRAISE("book_of_praise",8,1.0),
E_DWARVEN_HAMMER("hammer",5,1.0),

E_PRENTICE_WAND("prentice_wand",null,null),
E_ALDER_WAND("alder_wand",4,1.0),
E_WILLOW_WAND("willow_wabd",5,1.0),
E_HAZEL_WAND("hazel_wand",4,1.0),
E_YEW_WAND("yew_wand",5,1.0),
E_FLINT_WAND("flint_wand",5,1.0),
E_SHORTBOW("shortbow",null,null),
E_LONGBOW("longbow",4,1.0),
E_SLING("sling",null,null),
E_MAGIC_SLING("sling",7,1.0),
E_CROSSBOW("crossbow",4,1.0),
E_JAVELINS("javelin",null,null),
E_ELVEN_BOW("elven_bow",5,1.0),
E_GNOMISH_CROSSBOW("gnomish_crossbow",6,1.0),
E_FORKED_WAND("forked_wand",7,1.0),
E_ORBED_WAND("orbed_wand",7,1.0),
E_GILT_WAND("gilt_wand",8,1.0),
E_DRAGON_HORN_BOW("dragon_horn_bow",8,1.0),
E_UNSEELIE_BOW("unseelie_bow",8,1.0),

E_SHIELD("shield",4,1.0),
E_BUCKLER("buckler",null,null),
E_DWARVEN_SHIELD("dwarven_shield",6,1.0),
E_BLAZONED_SHIELD("blazoned_shield",5,1.0),
E_TOWER_SHIELD("tower_shield",5,1.0),
E_MIRRORED_SHIELD("mirrored_shield_b_96_01",6,1.0),
E_DIRK("normal_knife_a_96_01",null,null),
E_MAIN_GAUCHE("main_gauche",4,1.0),
E_WHIP("whip",null,null),

E_DARK_BISHOP_MACE("big_mace2",null,null),
E_DARK_ELF_SWORD_RIGHT("dark_elf_sword",null,null),
E_DARK_ELF_SWORD_LEFT("dark_elf_sword",null,null),
E_WRAITH_CLOAK("cloak",null,null),
E_TEMPLAR_PLATE("templar",8,0.5),
E_HOSPITALLER_PLATE("hospitaller",8,0.5),
E_HEALER_ROBE("colored_robe_light_green_a_96_01",8,1.0),
E_WHITE_STAFF("white_staff",7,1.0),

E_CLOAK_CONCEALMENT("invis_cloak",7,0.5),
E_FAMILIAR_CAT("bad_cat",4,0.3),
E_FAMILIAR_RAVEN("raven",5,0.3),
E_FAMILIAR_IMP("imp",6,0.3),
E_FAMILIAR_GOLD_DRAGON("baby_gold",7,0.3),
E_FAMILIAR_WHITE_DRAGON("baby_white_dragon",6,0.3),

E_HOLY_SYMBOL_1("holy_symbol_1",6,0.5),
E_HOLY_SYMBOL_2("holy_symbol_2",7,0.5),
E_MAGE_KNIFE("dirk",6,0.5),
E_KRILL("magic_dagger_a_96_01",null,null),
E_SHIELD_DEFENSE("buckler",null,null),

E_FLAMING_SWORD("flaming_sword",8,0.5),
E_DRAINING_SWORD("draining_greatsword",8,0.5),

E_PLUMED_HELM(null,6,0.5),
E_HOODED_CLOAK(null,5,0.5),
E_VISORED_HELM(null,5,0.3),
E_CHAIN_UNDERVEST(null,5,0.5),
E_HUNTERS_SASH(null,7,0.5),
E_ELVEN_ARROWS(null,6,0.5),
E_DUELLISTS_BRACERS(null,6,0.3),
E_BRACERS_OF_DEFENSE(null,5,0.3),
E_UNICORN_HORN(null,7,0.5),
E_TREASURE_MAP(null,5,0.5),
E_BELT_OF_SCALPS(null,null,null),
E_ELVEN_BOOTS(null,6,0.5),
E_FLASK_OF_ELIXIR(null,6,0.7),
E_GUERDON(null,6,0.5),
E_POISON_ARROWS(null,null,null),
E_RING_OF_FREE_ACTION(null,7,0.5),
E_MIRRORED_HELM(null,7,0.3),
E_GLOWING_PHIAL(null,5,0.5),
E_CURSE_SKULL(null,null,null),
E_SHINING_ICON(null,6,0.3),
E_HOLY_WATER_SPRINKLER(null,5,0.3),
E_LUCKY_CHARM(null,null,null),
E_PAN_PIPE(null,null,null),
E_PEARL_AMULET(null,6,0.5),
E_POTION_BELT(null,6,0.7),
E_GAUNTLETS_OF_POWER(null,8,0.5),
E_AMULET_OF_WARDING(null,6,0.5),
E_WIZARDS_HAT(null,6,0.5),
E_BANDANNA(null,7,0.5),
E_CRUSADERS_CAP(null,7,0.5),
E_PROTECTIVE_TALISMAN(null,7,0.5),
E_CHALICE(null,8,0.3),
E_MAGIC_CARPET(null,null,null),
E_MEDUSA_GIRDLE(null,null,null),
;

	private final String image;
	private final Integer random_level;
	private final Double likelihood;
	private Equipment_type_code(final String _image, final Integer _random_level, final Double _likelihood){image = _image; random_level=_random_level; likelihood=_likelihood;}
	public String get_image(){
		return image;
	 }
	public Integer get_random_level(){
		return random_level;
	 }
	public Double get_likelihood(){
		return likelihood;
	 }
};

	public enum Trinket_type_code {
TR_HEADGEAR,
TR_CLOAK,
TR_ARROWS,
TR_FOOTWEAR,
TR_BRACERS,
TR_BELT,
	};

	public enum Dungeon_event_code {
DE_MOBS,
DE_PAUSE,
DE_MESSAGE,
DE_NOFLEE,
DE_GOLD,
DE_WIN,
DE_CLEARMOBS,
DE_QUIT,
DE_GEMS,
DE_CHECKTRAPS,
DE_GOLDCHEST,
DE_GEMSCHEST,
DE_PIT,
DE_EXPLOSIVERUNE,
DE_NOFLY,
DE_CANFLY,
DE_ALIGHT,
DE_GASTRAP,
DE_SUMMONINGRUNE,
DE_SPIKEDPIT,
DE_WEBTRAP,
DE_LOOT,
DE_DOOR,
DE_DOWNSTAIRS,
DE_UPSTAIRS,
DE_NOBRIBE,
DE_LOCKEDDOOR,
DE_ILLUSIONSRUNE,
DE_FIRETRAP,
DE_TELEPORTRUNE,
DE_CRAG,
DE_ROCK,
DE_CLIMB,
DE_FEAR,
DE_ILLUSIONS,
DE_SOUND,
DE_NOSNEAK,
DE_NOPRAY,
DE_TUTORIAL,
	};

	public enum Monster_code {
MOB_CENTIPEDE,
MOB_KOBOLD,
MOB_ORC_WRETCH,
MOB_HARPY,
MOB_ORC_ROCK_THROWER,
MOB_SNAKE,
MOB_TROGLODYTE,
MOB_BLAST_SPORE,
MOB_COBRA,
MOB_GIANT_FIREFLY,
MOB_GIANT_WASP,
MOB_JELLY,
MOB_MILLIPEDE,
MOB_ORC_WARRIOR,
MOB_PYTHON,
MOB_SKELETON,
MOB_TROGLODYTE_ARCHER,
MOB_WOLF,
MOB_LEPRECHAUN,
MOB_OOZE,
MOB_ORC_AGITATOR,
MOB_ORC_SLAVEMASTER,
MOB_ORC_WITH_MANCATCHER,
MOB_SPECTRE,
MOB_TROGLODYTE_SHAMAN,
MOB_CLAY_GOLEM,
MOB_NAGA_ARCHER,
MOB_NAGA_WARRIOR,
MOB_OGRE,
MOB_ORC_CHAMPION,
MOB_TROGLODYTE_PRIEST,
MOB_TURTLOID,
MOB_WHITE_WOLF,
MOB_WIGHT,
MOB_WRAITH,
MOB_ARTIFICER,
MOB_BASILISK,
MOB_BLACK_KNIGHT,
MOB_BLACK_OGRE,
MOB_BURNING_GHOST,
MOB_DARK_DWARF,
MOB_DARK_ELF_ARCHER,
MOB_DARK_PRIEST,
MOB_LIME_JELLY,
MOB_MAGE,
MOB_MAGEBANE_EYE,
MOB_MUTE_GHOST,
MOB_SHADOW,
MOB_TROGLODYTE_BEASTMASTER,
MOB_BAN_SIDHE,
MOB_HILL_GIANT,
MOB_ORC_BOSS,
MOB_STONE_GOLEM,
MOB_SUMMONER,
MOB_YOUNG_RED_DRAGON,
MOB_DARK_ELF_BOSS,
MOB_FIRE_ELEMENTAL,
MOB_MAULER,
MOB_SNAKE_BOSS,
MOB_SORCERER,
MOB_YOUNG_GREEN_DRAGON,
MOB_YOUNG_BLUE_DRAGON,
MOB_UGLY_THING,
MOB_MANTICORE,
MOB_TROLL,
MOB_FROZEN_SPIRIT,
MOB_WARLOCK,
MOB_GIANT_ANT,
MOB_THUG,
MOB_BIG_KOBOLD,
MOB_GOBLIN,
MOB_BEETLE,
MOB_MINOTAUR,
MOB_SCORPION,
MOB_BEAR,
MOB_YOUNG_NECROMANCER,
MOB_BIG_SPIDER,
MOB_HELLHOUND,
MOB_DARK_DWARF_LAIRD,
MOB_DARK_ELF_DRUID,
MOB_MUMMY,
MOB_AIR_ELEMENTAL,
MOB_POLTERGEIST,
MOB_BERSERKER,
MOB_RAVEN,
MOB_BAD_CAT,
MOB_BIG_FROG,
MOB_TROGLODYTE_WARRIOR,
MOB_HALBERDIER,
MOB_HALF_TROLL,
MOB_BABY_RED_DRAGON,
MOB_BABY_GREEN_DRAGON,
MOB_BABY_BLUE_DRAGON,
MOB_WHIRLWIND,
MOB_DARK_ELF_SWORDSMAN,
MOB_FOREIGN_WARRIOR,
MOB_ENCHANTER,
MOB_TROGLODYTE_CROSSBOWMAN,
MOB_IMP,
MOB_QUASIT,
MOB_GUARDIAN_EYE,
MOB_ILLUSIONIST,
MOB_TIME_VORTEX,
MOB_LIGHTNING_DOG,
MOB_BIG_SNAKE,
MOB_VORTEX,
MOB_CLAWED_SPECTRE,
MOB_WINGED_SPECTRE,
MOB_EYE_OF_NEGATION,
MOB_DRIDER,
MOB_LIZARDMAN,
MOB_WAR_TROLL,
MOB_NAGA_PRIESTESS,
MOB_SHADOW_SPIDER,
MOB_ROC,
MOB_ICE_DEMON,
MOB_WIZARD_OF_THE_NORTH,
MOB_PYROMANCER,
MOB_DOPPELGANGER,
MOB_DARK_BISHOP,
MOB_SNIPER,
MOB_ASSASSIN,
MOB_BABY_EE,
MOB_EE,
MOB_WE,
MOB_GIANT_SKELETON,
MOB_BIG_WRAITH,
MOB_BABY_WHITE,
MOB_SHADOWCASTER,
MOB_NECROMANCER,
MOB_CHEST_MIMIC,
MOB_UNDEAD_BOSS_PHASE12,
MOB_UNDEAD_BOSS_PHASE3,
MOB_UNDEAD_BOSS_PHASE4,
MOB_ORC_BOSS_2,
MOB_CHAMPION,
MOB_STONE_GIANT,
MOB_WHITE_WOLF_LEADER,
MOB_BAT,
};

	public enum Monster_action_code {
MA_SNIPE_DARK_ELF_BOSS,
MA_GAZE_SCARE_ALL,
MA_CLAW_OFTEN,
MA_ANTICASTER,
MA_AURA_COOL,
MA_AURA_COLD, /* boss power */
MA_AURA_FIRE,
MA_BITE, /* boss power, sometimes bypasses normal block */
MA_BLOCK,
MA_BREATH_FIRE,
MA_BREATH_POISON_CLOUD, /* All-front-row poison DOT. If you have poison res you take half damage and dont get poisoned */
MA_CATCH,
MA_CLAW, /* boss level power */
MA_CLAW_FAST, /* boss level power */
MA_DARKNESS,
MA_DWARF_SPIRITS,
MA_ENTER_SHELL,
MA_EXIT_SHELL,
MA_EXPLODE,
MA_FINISHING_BLOW,
MA_FIREBOLT, /* Not the spell */
MA_FLEE,
MA_FLEE_FAST,
MA_FLIT,
MA_FLIT_TAUNT,
MA_FLY,
MA_GAZE_DRAIN_BAR,
MA_GAZE_PARALYSIS,
MA_GAZE_PARALYSIS_OFTEN,
MA_GAZE_SCARE,
MA_GAZE_SLEEP,
MA_GET_CONFUSED,
MA_GRAPPLE,
MA_HOWL,
MA_IRISH,
MA_LEAP_AWAY,
MA_METEOR_SWARM,/* see 'em coming and get out of the way */
MA_RALLY_ORCS,
MA_RALLY_TROGLODYTES,
MA_SCOTS,
MA_SHRIEK_SCARE,
MA_SILENCE,
MA_SMITE,
MA_SMITE_BLACK_KNIGHT,
MA_SMITE_BLACK_OGRE,
MA_SMITE_DARK_ELF,
MA_SMITE_DARK_PRIEST,
MA_SMITE_NAGA,
MA_SMITE_OGRE,
MA_SMITE_ORC_BOSS,
MA_SMITE_ORC_CHAMPION,
MA_SNIPE,
MA_SNIPE_DARK_ELF,
MA_SNIPE_NAGA,
MA_SNIPE_ORC_BOSS,
MA_SOFT_ENRAGE,
MA_SPELL_CAUSE_WOUNDS,
MA_SPELL_DEFLECT_MISSILES,
MA_SPELL_FIREBOLT,
MA_SPELL_HEAL,
MA_SPELL_INVULNERABILITY,
MA_SPELL_LIGHTNING,
MA_SPELL_PARALYSIS,
MA_SPELL_POISON_CLOUD,
MA_SPELL_SCARE,
MA_SPELL_SILENCE,
MA_SPELL_SLEEP,
MA_SPIT,
MA_SQUEEZE,
MA_STUN,
MA_SUMMON_ANIMALS,
MA_SUMMON_COBRAS,
MA_SUMMON_EVIL_TRASH,
MA_SUMMON_GOLEM,
MA_SUMMON_ORCS,
MA_SUMMON_REPTILES,
MA_SUMMON_SNAKES,
MA_SUMMON_TROGLODYTES,
MA_SUMMON_UNDEAD,
MA_SUMMON_VARIOUS,
MA_SUMMON_WRETCH,
MA_SUPER_SMITE,
MA_SWOOP,
MA_TAILSWIPE,
MA_ZAP,
MA_HURL_AND_ADVANCE,
MA_ADVANCE,
MA_AURA_FIRE_RAGE,
MA_CHILL_DART,
MA_SHOVE,
MA_SHADOW_BOLT,
MA_SUMMON_BODYGUARD,
MA_SUMMON_FRONT,
MA_FLEE_SLOWLY,
MA_SNIPE_MANTICORE,
MA_ARGOT,
MA_STEAL,
MA_CHARGE,
MA_SUMMON_LOW_UNDEAD,
MA_STING_PARALYSIS,
MA_BREATH_SMALL_FIRE,
MA_BURNS,
MA_CURSE,
MA_TORNADO,
MA_SNIPE_POLTERGEIST,
MA_CLEAVE,
MA_SMITE_BERSERKER,
MA_SMITE_TROLL,
MA_SQUARK, // raven small fear
MA_BACK_ATTACK, // halberdier
MA_BREATH_MINI_FIRE, // baby dragon
MA_BREATH_MINI_POISON, // baby dragon
MA_BREATH_MINI_LIGHTNING, // baby dragon
MA_BREATH_SMALL_LIGHTNING, // lightning dog
MA_SMALL_CLAW, // baby dragons
MA_TORNADO_DISAPPEAR, // whirlwind
MA_DEBUFF_DISAPPEAR, // vortex
MA_FLURRY, // naga priestess. Three smites in a row. Make sure a single blocker can't take them all, give Block a cooldown if need be)
MA_SMALL_FLURRY, // foreign warrior
MA_SUMMON_ILLUSION,
MA_SUMMON_ILLUSION_OFTEN, // illusionist
MA_SQUEEZE_NASTY,/* boss level version */
MA_DRAINING_TOUCH_DISAPPEAR, // blue bar DOT until you run out, and disappear
MA_STRANGLING_WEBS, // not sure
MA_ICE_STORM, // Take coverable (but still does some damage)
MA_SPELL_FIREBALL, // Take coverable (but still does some damage) - Wipe if you don't resist or take cover from it
MA_SUMMON_MINOR_DEMONS,
MA_SUMMON_MOUNTAIN_ANIMALS,
MA_SUMMON_DOPPELGANGER, // no more than once
MA_IMITATE, // doppelganger
MA_COUNTER_HEALING,
MA_COUNTER_WARD, // counter a counterspell
MA_REFLECTION, // not 100% reliable
MA_DISPEL_MAGIC, // Remove various buffs
MA_FOCUS, //Concentrate personal hate on a single character
MA_DROP_BOULDER, //roc and blue dragon
MA_DARKNESS_OFTEN, // shadow spider
MA_LUNGE_1, // L4/5 enemies
MA_BIRD_SHRIEK_SCARE,
MA_GLOAT,
MA_MASS_HEALING,
MA_GAZE_PETRIFY,
MA_STAB_AND_DISAPPEAR,
MA_SNIPE_SNIPER,
MA_WASTE_TIME,
MA_ANGST,
MA_EARTH_SHOCK,
MA_DROWN,
MA_DISAPPEAR,
MA_BREATH_MINI_COLD,
MA_SMITE_OATHWRAITH,
MA_FINGER_OF_DEATH,
MA_DARKNESS_STORM,
MA_BIG_SHADOW_BOLT,
MA_DRAINING_TOUCH,
MA_FLURRY_CHEST,
MA_BREATH_LIGHTNING,
MA_CLAW_FAST_AND_OFTEN,
MA_FLASHING_GAZE,
MA_REAR_UP,
MA_METEOR_SWARM_WAIT_SUMMON_UNDEADS_FLEE,
MA_ALWAYS_FLY,
MA_ALWAYS_FLY_AND_LEAVE_LATER,
MA_SPELL_BIG_DRAIN,
MA_SUMMON_GOLEMS_INSTANTLY_AND_METEOR_SWARM_LATER,
MA_SMITE_ORC_BOSS_2,
MA_LUNGE_2,
MA_SUMMON_WOLVES,
MA_EPIC_BLOCK,
MA_SUPER_SMITE_OFTEN,
MA_HURL,
MA_BACK_ATTACK_2,
MA_SUMMON_WHITE_WOLVES,
MA_LICH_WASTE_TIME,
MA_FLY_OFTEN, 
MA_FLIT_OFTEN,
};

	public enum Potion_type {
POT_SMALLHEAL(Character_action_code.CA_POT_SMALLHEAL,1,"smallheal"),
POT_MEDHEAL(Character_action_code.CA_POT_MEDHEAL,1,"medheal"),
POT_BIGHEAL(Character_action_code.CA_POT_BIGHEAL,5,"bigheal"),
POT_BAR_PRIEST(Character_action_code.CA_POT_BARPRIEST,4,"blessed"),
POT_BAR_MAGE(Character_action_code.CA_POT_BARMAGE,4,"bar"),
POT_BAR_ROGUE(Character_action_code.CA_POT_BARROGUE,4,"wine"),
POT_PERCENTHEAL(Character_action_code.CA_POT_PERCENTHEAL,6,"percentheal"),
POT_ANTIDOTE(Character_action_code.CA_POT_ANTIDOTE,1,"antidote"),
POT_FIRE_RESIST(Character_action_code.CA_POT_FIRERESIST,4,"cool"),
POT_COLD_RESIST(Character_action_code.CA_POT_COLDRESIST,6,"warmth"),
POT_INVULNERABILITY(Character_action_code.CA_POT_INVULNERABILITY,6,"white"),
POT_COURAGE(Character_action_code.CA_POT_COURAGE,1,"brandy"),
POT_BERSERK(Character_action_code.CA_POT_BERSERK,4,"berserk"),
POT_BAR(Character_action_code.CA_POT_BAR,6,"bigbar"),
POT_BOOM(Character_action_code.CA_POT_BOOM,4,"boom_flask"),
POT_BALM(Character_action_code.CA_POT_BALM,8,"balm"),
POT_PHILTRE(Character_action_code.CA_POT_PHILTRE,8,"philtre"),
;

	private final Character_action_code cac;
	private final int min_level;
	private final String image;
	private Potion_type(final Character_action_code _cac, int _min_level, String _image){this.cac = _cac; this.min_level = _min_level; this.image=_image;}
	public Character_action_code get_character_action_code(){
		return cac;
	 }
	public int get_min_level(){
		return min_level;
	 }
	public String get_image(){
		return image;
	 }
	};


	public enum Scenario_code {
		SC_TUTORIAL(null,10,"Tutorial"),
		SC_EASY(null,4,"Caves near town"),
		SC_RANDOM_3(null,10,"L3 random dungeon"),
		SC_RANDOM_4(SC_RANDOM_3,10,"L4 random dungeon"),
		SC_RANDOM_5(SC_RANDOM_4,10,"L5 random dungeon"),
		SC_RANDOM_6(SC_RANDOM_5,10,"L6 random dungeon"),
		SC_RANDOM_7(SC_RANDOM_6,10,"L7 random dungeon"),
		SC_RANDOM_8(SC_RANDOM_7,10,"L8 random dungeon"),
		SC_SWAMP_1(SC_RANDOM_3,5,"Swamp 1"),
		SC_SWAMP_2(SC_SWAMP_1,6,"Swamp 2"),
		SC_TROLL_1(SC_RANDOM_3,5,"Trollsbridge"),
		SC_TROGLODYTE_1(SC_RANDOM_3,5,"Troglodyte cave 1"),
		SC_TROGLODYTE_2(SC_TROGLODYTE_1,7,"Troglodyte cave 2"),
		SC_PARTY_1(SC_SWAMP_1,5,"Enemy party 1"),
		SC_PARTY_2(SC_PARTY_1,7,"Enemy party 2"),
		SC_PARTY_3(SC_PARTY_2,10,"Enemy party 3"),
		SC_PARTY_4(SC_PARTY_3,10,"Enemy party 4"),
		SC_CRYPT_1(SC_RANDOM_4,5,"Crypt 1"),
		SC_CRYPT_2(SC_CRYPT_1,7,"Crypt 2"),
		SC_CRYPT_3(SC_CRYPT_2,10,"Crypt 3"),
		SC_ORC_1(SC_RANDOM_4,5,"Orc 1"),
		SC_ORC_2(SC_ORC_1,6,"Orc 2"),
		SC_ORC_3(SC_ORC_2,8,"Orc 3"),
		SC_EXPLOSIVE_CAVE(SC_SWAMP_1,6,"Blast spore infestation"),
		SC_RED_DRAGON(SC_RANDOM_4,6,"Red dragon's lair"),
		SC_ALEX(SC_RANDOM_6,10,"Alex's dungeon"),
		SC_SNAKE_1(SC_RED_DRAGON,5,"Snake pit 1"),
		SC_SNAKE_2(SC_SNAKE_1,7,"Snake pit 2"),
		SC_SNAKE_3(SC_SNAKE_2,10,"Snake pit 3"),
		SC_LABYRINTH(SC_TROLL_1,5,"Labyrinth"),
		SC_CRAG(SC_LABYRINTH,7,"Crag"),
		SC_WIZARD_TOWER_1(SC_TROGLODYTE_1,5,"Wizard's tower 1"),
		SC_WIZARD_TOWER_2(SC_WIZARD_TOWER_1,7,"Wizard's tower 2"),
		SC_WIZARD_TOWER_3(SC_WIZARD_TOWER_2,10,"Wizard's tower 3"),
		SC_PYRAMID_1(SC_CRYPT_1,6,"Pyramid"),
		SC_EVIL_FOREST(SC_RED_DRAGON,10,"Blighted forest"),
		SC_RIVERSIDE(SC_RED_DRAGON,10,"Riverside"),
		SC_LANDSLIDE(SC_CRYPT_2,10,"Landslide"),
		SC_WATERFALL(SC_CRYPT_2,10,"Waterfall"),
		SC_FOREST_FIRE(SC_SWAMP_2,6,"Forest fire"),
		SC_DARK_TEMPLE_1(SC_CRYPT_1,6,"Dark temple 1"),
		SC_DARK_TEMPLE_2(SC_DARK_TEMPLE_1,10,"Dark temple 2"),
		SC_DOPPELGANGER_PARTY(SC_PARTY_2,10,"Doppelganger cave"),
		SC_DESERT(SC_EVIL_FOREST,10,"Desert"),
		SC_LICH(SC_DESERT,10,"Old fort")
		;

		private final Scenario_code prerequisite;
		private final Integer max_level;
		private final String name;
		private Scenario_code(final Scenario_code _prerequisite, Integer _max_level, String _name){this.prerequisite = _prerequisite; this.max_level = _max_level; this.name=_name;}
		public Scenario_code get_prerequisite(){
			return prerequisite;
		 }
		public Integer get_max_level(){
			return max_level;
		 }
		public String get_name(){
			return name;
		 }}

	public enum Action_color_code {
		ACC_WHITE(Color.WHITE),
		ACC_RED(Color.argb(30,255,50,50)),
		ACC_GREEN(Color.argb(30,100,255,100)),
		ACC_YELLOW(Color.argb(30,255,255,100)),
		ACC_BLUE((Color.argb(30,100,100,255))),
		ACC_GREY((Color.argb(30,255,50,255))); // actually purple
	private final int c;
	private Action_color_code(final int _c){this.c = _c;}
	public int get_color(){
		return c;}
	}

}
